#include"stack.h"
#include"queue.h"
#include"priority_queue.h"
void test_stack()
{
	my_std::stack<int, deque<int>>st;
	st.push(1);
	st.push(2);
	st.push(3);
	st.push(4);
	st.push(5);
	st.push(6);

	cout << "st.size(): " << st.size() << endl;
	cout << " st.empty(): " << st.empty() << endl;
	while (!st.empty())
	{
		cout << st.top() << " ";
		st.pop();
	}

	cout << endl;
}

void test_queue()
{
	my_std::queue<int, deque<int>>q;
	q.push(1);
	q.push(2);
	q.push(3);
	q.push(4);
	q.push(5);
	q.push(6);

	cout << "q.size(): " << q.size() << endl;
	cout << " q.empty(): " << q.empty() << endl;
	while (!q.empty())
	{
		cout << q.front() << " ";
		q.pop();
	}

	cout << endl;
}
void test_priority_queue()
{
	my_std::priority_queue<int>pq;
	pq.push(3);
	pq.push(7);
	pq.push(2);
	pq.push(5);
	pq.push(1);
	pq.push(6);

	cout << "pq.size(): " << pq.size() << endl;
	cout << " pq.empty(): " << pq.empty() << endl;
	while (!pq.empty())
	{
		cout << pq.top() << " ";
		pq.pop();
	}

	cout << endl;
}

void test_my_std1()
{
	my_std1::priority_queue<int,vector<int>,greater<int>>pq;
	pq.push(3);
	pq.push(7);
	pq.push(2);
	pq.push(5);
	pq.push(1);
	pq.push(6);

	cout << "pq.size(): " << pq.size() << endl;
	cout << " pq.empty(): " << pq.empty() << endl;
	while (!pq.empty())
	{
		cout << pq.top() << " ";
		pq.pop();
	}

	cout << endl;
}
int main()
{
	//test_stack();
	//test_queue();
	//test_priority_queue();
	test_my_std1();
	return 0;
}